/*
 * @lc app=leetcode.cn id=1346 lang=typescript
 *
 * [1346] 检查整数及其两倍数是否存在
 */

// @lc code=start
function checkIfExist(arr: number[]): boolean {
    for (let i = 0; i < arr.length; i++) {
        const element = arr[i];
        const half = element / 2;
        const double = element * 2;
        for (let j = i + 1; j < arr.length; j++) {
            if (arr[j] === half || arr[j] === double) return true;
        }
    }
    return false;
}
// @lc code=end
